<?php
// @formatter:off
/**
 * @file WCCronTool.php
 * @author Alejandro Dario Simi
 * @date $Date: 2013-06-04 03:02:53 +0000 (Tue, 04 Jun 2013) $
 *
 * $Id: WCCronTool.php 68 2013-06-04 03:02:53Z daemonraco@gmail.com $
 * $URL: http://wcomix.googlecode.com/svn/tags/wcomix-1.0-BETA2/includes/WCCronTool.php $
 */
// @formatter:on

/**
 * @class WCCronTool
 * This class represents in a generic way the specification of a cron operation
 * and it's used by WCCron. Every cron operation must be an inheritance of this
 * class.
 */
class WCCronTool {
	/**
	 * @var boolean This flag indicates the list of options and their
	 * configuration are already loaded.
	 */
	protected $_optionsLoaded = false;
	/**
	 * @var array()
	 * @todo check if deprecated
	 */
	protected $_options = array();
	/**
	 * @var array()
	 * @todo check if deprecated
	 */
	protected $_sets = array();
	/**
	 * @var boolean
	 */
	protected $_jumpAnalysis = false;
	/**
	 * @var WCConnection
	 */
	protected $_db;
	protected $_dbprefix;

	public function __construct() {
		global $wcDatabaseAccess;

		$this->_db = WCConnection::Instance();
		$this->_dbprefix = $wcDatabaseAccess['prefix'];

		$this->loadOptions();
	}
	public function __destruct() {
	}
	//
	// Public methods.
	public function run($spacer = "") {
		die(__CLASS__."::".__FUNCTION__."() Subclass Resposabillity\n");
	}
	public function checkParams($options = null) {
		global $wcOptions;
		$wcOptions->check($options);
	}
	public function showHelp($spacer = "") {
		die(__CLASS__."::".__FUNCTION__."() Subclass Resposabillity\n");
	}
	//
	// Protected methods.
	protected function loadOptions() {
		die(__CLASS__."::".__FUNCTION__."() Subclass Resposabillity\n");
	}
}
?>